<template>
  <div >
    <input type="button" value="浪起来"  v-on:click="ks" >
    <input type="button" value="停止"  @click='stop'  >
    <h3>{{ msg }}</h3>
  </div>
</template>

<script>
export default {
  data(){
    return {
      msg:'我拿Buff,谢谢~',
       time:null,
       thsz:[],
       cont:0

    }
  },
  methods:{
    xz(){
     
      this.thsz=this.msg.split('') 
      this.thsz.push(this.thsz[0])
       this.thsz.shift() 
      this.msg=this.thsz.join('')   
    },
    timess(){
      this.time= setInterval(this.xz,100)
    },
    ks(){
      if(this.cont==1){
        return}else{
    this.timess()
     this.cont=1
        }
    },
    stop(){
      this.cont=0
        clearInterval(this.time)     
      }
    
     
  }

}
</script>

<style scoped>

</style>
